#pragma once
#ifndef LIT__EDITOR__POLICE__HH__
#define LIT__EDITOR__POLICE__HH__

#include <LitEditorPrerequisites.h>
#include <qcolor.h>
#include <qfont.h>
#include <qtextformat.h>

namespace Lit
{
	namespace Editor
	{
		struct LIT_API FontFamily
		{
			static std::string CourrierNew;
			static std::string TimesNewRoman;
			static std::string Arial;
			static std::string ArialBlack;
			static std::string Helvetica;
			static std::string ComicSansMs;
		};
		struct LIT_API Police
		{
			QFont font;
			QColor color;

			Police& operator = ( const Police& rk );
			Police( const Police& rk );

			Police( const QFont &font_, const QColor &col = QColor(Qt::black) );
			Police( const std::string &family, int size = 10, unsigned int modifier_flags = None, const QColor &col = QColor(Qt::black) );
			Police();
			
			bool isStrikeOut() const;
			bool isUnderline() const;
			bool isItalic() const;
			bool isBold() const;

			void setStrikeOut( bool strikeOut ) ;
			void setUnderline( bool underLine ) ;
			void setItalic( bool italic ) ;
			void setBold( bool bold ) ;

			void setModifiers( unsigned int modifier_flags );
			unsigned int getModifiers() const;

			static QTextCharFormat textFormatFromPolice( const Police &pol );
			static Police policeFromTextFormat( const QTextCharFormat& fmt );
		};
	};
};
#endif